/**
 * Defines an logger that appends the log at the end of the body of the page.<br>
 * quite messy, not well coded (inline style :'( ), but pretty efficient to debug notably on IE
 * @namespace Archetype.Loggers.PiDebuggerLogger
 * @author swiip_mat
 */
Archetype.Loggers.PiDebuggerLogger = {
    initialize:	_,
    init : function() {
        if(!$("PIDebugger")) {
            pi.dbgr.init();
            Archetype.require("Archetype.libs.pidebugger.debugger",{evaluation:"css"});
        }
    },
    log: function() {
        this.init();
        pi.dbgr.d.console.addLine().update("[INFO]"+$A(Archetype.Loggers.AbstractLogger._getArgs()).collect(function(o) {return pi.dbgr.d.console.format(o)}).toArray().join(" "));
        pi.dbgr.d.console.scroll();
    },
    debug: function() {
        this.init();
        pi.dbgr.d.console.addLine().update("[DEBUG]"+$A(Archetype.Loggers.AbstractLogger._getArgs()).collect(function(o) {return pi.dbgr.d.console.format(o)}).toArray().join(" "));
        pi.dbgr.d.console.scroll();
    },
    warn: function() {
        this.init();
        pi.dbgr.d.console.addLine().update("[WARN]"+$A(Archetype.Loggers.AbstractLogger._getArgs()).collect(function(o) {return pi.dbgr.d.console.format(o)}).toArray().join(" "));
        pi.dbgr.d.console.scroll();
    },
    error: function() {
        this.init();
        pi.dbgr.d.console.addLine().update("[ERROR]"+$A(Archetype.Loggers.AbstractLogger._getArgs()).collect(function(o) {return pi.dbgr.d.console.format(o)}).toArray().join(" "));
        pi.dbgr.d.console.scroll();
    },
    fatal: function() {
        this.init();
        pi.dbgr.d.console.addLine().update("[FATAL]"+$A(Archetype.Loggers.AbstractLogger._getArgs()).collect(function(o) {return pi.dbgr.d.console.format(o)}).toArray().join(" "));
        pi.dbgr.d.console.scroll();
    }
}